3.490 \(\int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx\)

Optimal. Leaf size=121 \[ \frac {i a 2^{\frac {n+3}{2}} (1+i \tan (c+d x))^{\frac {1}{2} (-n-1)} (a+i a \tan (c+d x))^{n-1} (e \sec (c+d x))^{3-n} \, _2F_1\left (\frac {1}{2} (-n-1),\frac {3-n}{2};\frac {5-n}{2};\frac {1}{2} (1-i \tan (c+d x))\right )}{d (3-n)} \]

[Out]

I*2^(3/2+1/2*n)*a*hypergeom([3/2-1/2*n, -1/2-1/2*n],[5/2-1/2*n],1/2-1/2*I*tan(d*x+c))*(e*sec(d*x+c))^(3-n)*(1+
I*tan(d*x+c))^(-1/2-1/2*n)*(a+I*a*tan(d*x+c))^(-1+n)/d/(3-n)

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3505, 3523, 70, 69} \[ \frac {i a 2^{\frac {n+3}{2}} (1+i \tan (c+d x))^{\frac {1}{2} (-n-1)} (a+i a \tan (c+d x))^{n-1} (e \sec (c+d x))^{3-n} \text {Hypergeometric2F1}\left (\frac {1}{2} (-n-1),\frac {3-n}{2},\frac {5-n}{2},\frac {1}{2} (1-i \tan (c+d x))\right )}{d (3-n)} \]

Antiderivative was successfully verified.

[In]

Int[(e*Sec[c + d*x])^(3 - n)*(a + I*a*Tan[c + d*x])^n,x]

[Out]

(I*2^((3 + n)/2)*a*Hypergeometric2F1[(-1 - n)/2, (3 - n)/2, (5 - n)/2, (1 - I*Tan[c + d*x])/2]*(e*Sec[c + d*x]
)^(3 - n)*(1 + I*Tan[c + d*x])^((-1 - n)/2)*(a + I*a*Tan[c + d*x])^(-1 + n))/(d*(3 - n))

Rule 69

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*Hypergeometric2F1[
-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b*(m + 1)*(b/(b*c - a*d))^n), x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-(d/(b*c - a*d)), 0]))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[(c + d*x)^FracPart[n]/((b/(b*c - a*d)
)^IntPart[n]*((b*(c + d*x))/(b*c - a*d))^FracPart[n]), Int[(a + b*x)^m*Simp[(b*c)/(b*c - a*d) + (b*d*x)/(b*c -
 a*d), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] &&
(RationalQ[m] ||  !SimplerQ[n + 1, m + 1])

Rule 3505

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*S
ec[e + f*x])^m/((a + b*Tan[e + f*x])^(m/2)*(a - b*Tan[e + f*x])^(m/2)), Int[(a + b*Tan[e + f*x])^(m/2 + n)*(a
- b*Tan[e + f*x])^(m/2), x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0]

Rule 3523

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist
[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f,
m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (e \sec (c+d x))^{3-n} (a+i a \tan (c+d x))^n \, dx &=\left ((e \sec (c+d x))^{3-n} (a-i a \tan (c+d x))^{\frac {1}{2} (-3+n)} (a+i a \tan (c+d x))^{\frac {1}{2} (-3+n)}\right ) \int (a-i a \tan (c+d x))^{\frac {3-n}{2}} (a+i a \tan (c+d x))^{\frac {3-n}{2}+n} \, dx\\ &=\frac {\left (a^2 (e \sec (c+d x))^{3-n} (a-i a \tan (c+d x))^{\frac {1}{2} (-3+n)} (a+i a \tan (c+d x))^{\frac {1}{2} (-3+n)}\right ) \operatorname {Subst}\left (\int (a-i a x)^{-1+\frac {3-n}{2}} (a+i a x)^{-1+\frac {3-n}{2}+n} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\left (2^{\frac {1}{2}+\frac {n}{2}} a^2 (e \sec (c+d x))^{3-n} (a-i a \tan (c+d x))^{\frac {1}{2} (-3+n)} (a+i a \tan (c+d x))^{\frac {1}{2}+\frac {1}{2} (-3+n)+\frac {n}{2}} \left (\frac {a+i a \tan (c+d x)}{a}\right )^{-\frac {1}{2}-\frac {n}{2}}\right ) \operatorname {Subst}\left (\int \left (\frac {1}{2}+\frac {i x}{2}\right )^{-1+\frac {3-n}{2}+n} (a-i a x)^{-1+\frac {3-n}{2}} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {i 2^{\frac {3+n}{2}} a \, _2F_1\left (\frac {1}{2} (-1-n),\frac {3-n}{2};\frac {5-n}{2};\frac {1}{2} (1-i \tan (c+d x))\right ) (e \sec (c+d x))^{3-n} (1+i \tan (c+d x))^{\frac {1}{2} (-1-n)} (a+i a \tan (c+d x))^{-1+n}}{d (3-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 12.26, size = 116, normalized size = 0.96 \[ \frac {8 e^3 (\tan (d x)+i) \sec (d x) (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n} \, _2F_1\left (3,\frac {3-n}{2};\frac {5-n}{2};i \sin (2 (c+d x))-\cos (2 (c+d x))\right )}{d (n-3) (\cos (c)+i \sin (c))^3 (\tan (d x)-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*Sec[c + d*x])^(3 - n)*(a + I*a*Tan[c + d*x])^n,x]

[Out]

(8*e^3*Hypergeometric2F1[3, (3 - n)/2, (5 - n)/2, -Cos[2*(c + d*x)] + I*Sin[2*(c + d*x)]]*Sec[d*x]*(I + Tan[d*
x])*(a + I*a*Tan[c + d*x])^n)/(d*(-3 + n)*(e*Sec[c + d*x])^n*(Cos[c] + I*Sin[c])^3*(-I + Tan[d*x])^2)

________________________________________________________________________________________

fricas [F]  time = 0.64, size = 0, normalized size = 0.00 \[ \frac {{\left ({\left ({\left (-i \, n - i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 i \, n e^{\left (2 i \, d x + 2 i \, c\right )} - i \, n + i\right )} \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{-n + 3} e^{\left (i \, d n x + i \, c n + n \log \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right ) + n \log \left (\frac {a}{e}\right )\right )} + 8 \, d e^{\left (2 i \, d x + 2 i \, c\right )} {\rm integral}\left (-\frac {1}{8} \, {\left (n^{2} + {\left (n^{2} - 1\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (n^{2} - 1\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )} \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{-n + 3} e^{\left (i \, d n x + i \, c n - 2 i \, d x + n \log \left (\frac {2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right ) + n \log \left (\frac {a}{e}\right ) - 2 i \, c\right )}, x\right )\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(3-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="fricas")

[Out]

1/8*(((-I*n - I)*e^(4*I*d*x + 4*I*c) - 2*I*n*e^(2*I*d*x + 2*I*c) - I*n + I)*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x +
 2*I*c) + 1))^(-n + 3)*e^(I*d*n*x + I*c*n + n*log(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1)) + n*log(a/e))
 + 8*d*e^(2*I*d*x + 2*I*c)*integral(-1/8*(n^2 + (n^2 - 1)*e^(4*I*d*x + 4*I*c) + 2*(n^2 - 1)*e^(2*I*d*x + 2*I*c
) - 1)*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^(-n + 3)*e^(I*d*n*x + I*c*n - 2*I*d*x + n*log(2*e*e^(I*
d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1)) + n*log(a/e) - 2*I*c), x))*e^(-2*I*d*x - 2*I*c)/d

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (e \sec \left (d x + c\right )\right )^{-n + 3} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(3-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((e*sec(d*x + c))^(-n + 3)*(I*a*tan(d*x + c) + a)^n, x)

________________________________________________________________________________________

maple [F]  time = 2.08, size = 0, normalized size = 0.00 \[ \int \left (e \sec \left (d x +c \right )\right )^{3-n} \left (a +i a \tan \left (d x +c \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*sec(d*x+c))^(3-n)*(a+I*a*tan(d*x+c))^n,x)

[Out]

int((e*sec(d*x+c))^(3-n)*(a+I*a*tan(d*x+c))^n,x)

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))^(3-n)*(a+I*a*tan(d*x+c))^n,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (\frac {e}{\cos \left (c+d\,x\right )}\right )}^{3-n}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e/cos(c + d*x))^(3 - n)*(a + a*tan(c + d*x)*1i)^n,x)

[Out]

int((e/cos(c + d*x))^(3 - n)*(a + a*tan(c + d*x)*1i)^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (e \sec {\left (c + d x \right )}\right )^{3 - n} \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*sec(d*x+c))**(3-n)*(a+I*a*tan(d*x+c))**n,x)

[Out]

Integral((e*sec(c + d*x))**(3 - n)*(I*a*(tan(c + d*x) - I))**n, x)

________________________________________________________________________________________